//
//  HHDemoController.swift
//  HHWeibo
//
//  Created by hehuafeng on 2017/2/16.
//  Copyright © 2017年 雷厉峰行. All rights reserved.
//

import UIKit

class HHDemoController: HHBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
    }
    
    override func setupTableView() {
        super.setupTableView()
        
        // 1. 设置右边按钮
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", normalColor: UIColor.darkGray, highlightedColor: UIColor.orange, target: self, action: #selector(showNext))
        
        // 2. 设置标题
        navItem.title = "第\(navigationController?.viewControllers.count ?? 0)个"
    }
    
    /// 监听方法
    @objc private func showNext() {
        let vc = HHDemoController()
        
        navigationController?.pushViewController(vc, animated: true)
    }
}
